<?php
class CategoryModel extends Model {
	public function deleteCate($id){
		if($id){
			$catePath = $this->where(array('id'=>$id))->getField('cate_path');
			return $this->where(array('cate_path'=>array('LIKE', $catePath.'%')))->delete();
		}
		return false;
	}
	
	public function getAllCateTextArray(){
		return $this->order('id DESC')->getField('id,name');	
	}
}